<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.org/ui">

<ui:composition>
	<p:dialog header="Input paid amount " widgetVar="payDlg"
		resizable="false" id="payDlg" showEffect="explode" hideEffect="clip"
		modal="false" style="width:600px;height:600px">
		<h:panelGrid columns="2">
			<h:outputText value="Delivered Total" />
			<h:panelGroup>
				<h:outputText value="#{orderModel.current.deliveredTotalPlusTax}">
					<f:convertNumber type="currency" currencySymbol="$"
						minFractionDigits="2" maxFractionDigits="2"></f:convertNumber>
				</h:outputText>
				<h:outputText value="(Tax included)"></h:outputText>
			</h:panelGroup>
			<h:outputText value="#{msgs.creditReward}" />
			<h:panelGroup>
				<h:outputText value="#{orderModel.current.promotionRewardRateLabel}" />
				<h:outputText value="*" />
				<h:outputText
					value="#{orderModel.current.deliveredTotalAmount}">
					<f:convertNumber type="currency" currencySymbol="$"
						minFractionDigits="2" maxFractionDigits="2"></f:convertNumber>
				</h:outputText>
				<h:outputText value="(Tax excluded)" ></h:outputText>
				<h:outputText value="=" />
				<h:outputText value="#{orderModel.current.promotionRewardAmount}">
					<f:convertNumber type="currency" currencySymbol="$"
						minFractionDigits="2" maxFractionDigits="2"></f:convertNumber>
				</h:outputText>
			</h:panelGroup>
			<h:outputText value="Paid by credit" />
			<h:outputText value="#{orderModel.current.paidByCreditAmount}">
				<f:convertNumber type="currency" currencySymbol="$"
					minFractionDigits="2" maxFractionDigits="2"></f:convertNumber>
			</h:outputText>
			<h:outputText value="Total Charge" />
			<h:outputText value="#{orderModel.current.deliveredTotalCharge}">
				<f:convertNumber type="currency" currencySymbol="$"
					minFractionDigits="2" maxFractionDigits="2"></f:convertNumber>
			</h:outputText>
			<h:outputText value="Paid cash" />
			<p:inputText value="#{orderModel.current.paidAmount}">
				<f:convertNumber type="number" maxFractionDigits="2"></f:convertNumber>
			</p:inputText>
			<h:outputText value="Extra discount " />
			<p:inputText value="#{orderModel.current.discountAmount}">
				
			</p:inputText>
			<p:commandButton value="OK" ajax="true" oncomplete="payDlg.hide()"
				update=":listForm, :detailForm,:headerForm" style="float:left"
				actionListener="#{orderController.payCurrent}" />
			<p:commandButton value="Cancel" type="button" onclick="payDlg.hide()"
				style="float:right" />
		</h:panelGrid>

	</p:dialog>
</ui:composition>

</html>